/*
 * Copyright (c) 2022.  Asiacom Technology Inc. All rights reserved
 */

package com.swanclouds.model.systems;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.swanclouds.model.ModelEntity;

/**
 * @author 张立强
 * @version jdk1.8.0
 */
@JsonRootName("BOOT")
public class BootReq implements ModelEntity {

	@JsonProperty("BootSourceOverrideMode")
	private String bootSourceOverrideMode;

	@JsonProperty("BootSourceOverrideEnabled")
	private Boolean bootSourceOverrideEnabled;

	@JsonProperty("BootSourceOverrideTarget")
	private String bootSourceOverrideTarget;

	public String getBootSourceOverrideMode() {
		return bootSourceOverrideMode;
	}

	public Boolean getBootSourceOverrideEnabled() {
		return bootSourceOverrideEnabled;
	}

	public String getBootSourceOverrideTarget() {
		return bootSourceOverrideTarget;
	}

	public static BootReq builder() {
		return new BootReq();
	}

	public BootReq bootSourceOverrideMode(String bootSourceOverrideMode) {
		this.bootSourceOverrideMode = bootSourceOverrideMode;
		return this;
	}

	public BootReq bootSourceOverrideEnabled(Boolean bootSourceOverrideEnabled) {
		this.bootSourceOverrideEnabled = bootSourceOverrideEnabled;
		return this;
	}

	public BootReq bootSourceOverrideTarget(String bootSourceOverrideTarget) {
		this.bootSourceOverrideTarget = bootSourceOverrideTarget;
		return this;
	}

	@Override
	public String toString() {
		ObjectMapper objectMapper = new ObjectMapper();
		try {
			return objectMapper.writeValueAsString(this);
		} catch (JsonProcessingException e) {
		}
		return "BootReq {" +
				"bootSourceOverrideMode='" + bootSourceOverrideMode + '\'' +
				", bootSourceOverrideEnabled=" + bootSourceOverrideEnabled +
				", bootSourceOverrideTarget='" + bootSourceOverrideTarget + '\'' +
				'}';
	}
}
